<template>
  <p-table
    :columns="columns"
    :dataSource="tableData"
    :pagination="false"
    size="middle"
    row-key="id"
    bordered
  />
</template>

<script>
import mixins from './list-mixins'

export default {
  mixins: [mixins],
  data() {
    return {
      columns: [
        {
          title: '序号',
          dataIndex: 'rowIndex',
          align: 'center',
          width: 60,
          customRender(text, record, index) {
            return index + 1
          }
        },
        {
          title: '物料名称',
          dataIndex: 'mname',
          align: 'center',
        },
        {
          title: '物料名称',
          dataIndex: 'mcode',
          align: 'center',
        },
        {
          title: '规格型号',
          dataIndex: 'sprc',
          align: 'center',
        },
        {
          title: '计划需求量',
          dataIndex: 'plannedQty',
          align: 'center',
        },
        {
          title: '已领用数量',
          dataIndex: 'collectedQty',
          align: 'center',
        }
      ]
    }
  },
  created() {
    this.url = '/mes-manufacture/mfStartWork/getMaterielInfo'
  }
}
</script>
